﻿using System.Collections.Generic;
using System.Diagnostics;
using BSDS.Core.Infrastructure.Logging;

namespace BSDS.Commands.Mailing
{
    public class MailingLogCollection : ILogConsumer
    {
        private readonly List<string> logs;

        public MailingLogCollection()
        {
            logs = new List<string>();
        }

        public void Consume(string message)
        {
            logs.Add(message);
        }

        public void Flush()
        {
            logs.Clear();
        }

        public IEnumerable<string> GetLogs()
        {
            return logs;
        }
    }
}